import request from '@/utils/request'

// 查询规格参数分页数据
export const GetProductSpecPage = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/spec/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}
//根据id删除规格参数
export const DeleteProductSpecById = id => {
  return request({
    url: `/admin/product/spec/deleteById/${id}`,
    method: 'DELETE',
  })
}
//根据id查询规格参数
export const GetProductSpecById = id => {
  return request({
    url: `/admin/product/spec/getById/${id}`,
    method: 'GET',
  })
}
//更新规格参数
export const UpdateProductSpecById = productSpec => {
  return request({
    url: `/admin/product/spec/updateById`,
    method: 'PUT',
    data: productSpec,
  })
}
//新增规格参数
export const SaveProductSpec = productSpec => {
  return request({
    url: `/admin/product/spec/save`,
    method: 'POST',
    data: productSpec,
  })
}
//查询所有的商品规格参数
export const FindAllProductSpec = () => {
  return request({
    url: `/admin/product/spec/findAll`,
    method: 'GET',
  })
}
